package cn.tedu.zx.pojo.admin.parm;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class AdminDataUpdateParam implements Serializable {

    @ApiModelProperty(value = "id", required = true, example = "1")
    private Long id;

    @ApiModelProperty(value = "管理员昵称", required = true, example = "雪碧的昵称")
    private String nickname;

    @ApiModelProperty(value = "管理员手机号码", required = true, example = "雪碧的手机号码")
    private String phone;

    @ApiModelProperty(value = "管理员邮箱", required = true, example = "雪碧的邮箱")
    private String email;

    @ApiModelProperty(value = "管理员头像", required = true, example = "雪碧的头像")
    private String icon;

    @ApiModelProperty(value = "管理员序号", required = true, example = "雪碧的序号")
    private Integer sort;

    /**
     * 管理员的角色ID的数组
     */
    @NotNull(message = "添加管理员失败，请至少选择1种角色！")
    @Size(min = 1, message = "添加管理员失败，请至少选择1种角色！")
    @ApiModelProperty(value = "管理员权限", required = true, example = "1,2,3")
    private Long[] roleIds;

}
